class EquipTool {
  /**
   * 根据呼叫器ID在场所列表中匹配出场所ID
   * @param localeList
   * @param beeperId
   */
  public static currentLocaleId(localeList: ILocaleFewInfoRes[], beeperId: number): number {
    if (localeList.length === 0 || !beeperId) return 0;
    if (beeperId < 1) return 0;
    let ret = 0;
    localeList.forEach((item) => {
      if (item.beeperIds.length > 0) {
        if (item.beeperIds.find((x) => x == beeperId)) {
          ret = item.id;
        }
      }
    });
    return ret;
  }
}

export default EquipTool;
